.form {
  $border: 1px solid $black;

  label {
    display: block;
    font-family: $code;
    font-weight: 700;
    font-size: 0.75em;
    margin-bottom: 0.5em;
  }

  &-element {
    margin-bottom: $base-spacing;
    width: 100%;

    &_wrap {
      &--2 {
        @include breakpoint(mobile) {
          display: flex;
          justify-content: space-between;

          .form-element {
            width: calc(50% - 10px);
          }
        }
      }

      &--3 {
        @include breakpoint(mobile) {
          display: flex;
          justify-content: space-between;

          .form-element {
            width: calc(33% - 10px);
          }
        }
      }
    }

    &-preppended_field {
      display: flex;

      span {
        border-bottom: $border;
        color: $black;
        cursor: e-resize;
        font-size: 16px;
        font-style: italic;
        line-height: 1.5em;
        padding: 0.75em 0.5em 0.75em 0;
        width: auto;
      }
    }

    textarea,
    input {
      border: none;
      border-bottom: $border;
      border-radius: 0; // Prevent iOS from rounding corners
      color: $black;
      font-size: 16px; // Prevent iOS from zooming on input elements
      line-height: 1.5em;
      padding: 0.75em 0;
      width: 100%;

      &:disabled {
        background: none;
        cursor: not-allowed;
        opacity: 0.3;
      }

      &::placeholder {
        opacity: 0.8em;
        color: $medium-grey;
      }
    }

    textarea {
      resize: vertical !important;
      height: 50px;
      outline: none;
    }

    &-error,
    &-note {
      color: $medium-grey;
      font-family: $code;
      font-size: 0.6875em;
      font-style: italic;
      margin: 5px 0;
    }
    &-error { color: $red; }
  }

  &-submit {
    @include breakpoint(mobile) {
      align-items: center;
      display: flex;
      justify-content: space-between;
      text-align: right;
    }

    &-note,
    &-toc {
      color: $blue-grey;
      font-family: $code;
      font-size: 0.8125em;
      font-style: italic;
      margin-bottom: 25px;
      max-width: 340px;
      text-align: left;

      @include breakpoint(mobile) { margin-bottom: 0; }

      a {
        color: $blue-grey;
        border-bottom: 1px solid $blue-grey;

        &:hover {
          color: $black;
        }
      }
    }

    input {
      background: $green;
      border: none;
      border-radius: $base-border-radius;
      color: $white;
      cursor: pointer;
      font-weight: bold;
      padding: 0.5em 30px 0.4em;
      transition: background 0.1s $base-easing;

      &:hover { background: darken($green, 10%); }
    }

    input[disabled] {
      background: $light-grey;
    }
  }

  &-checklist {
    margin: 0 0 $base-spacing;

    & > label {
      margin-bottom: $base-spacing / 2;
    }

    &-item {
      padding: 15px 0 13px;

      label {
        align-items: center;
        font-family: $content;
        font-size: 0.875em;
        font-weight: normal;
        display: flex;
        margin: 0;

        .form-checklist-item-text {
          flex: 1 100%;
          user-select: none;
        }

        input[type=checkbox] { display: none; }
        input[type=checkbox] + .form-checklist-item-box {
          flex: 0 0 21px;
          border: 1px solid $black;
          display: block;
          margin: 0 1em;
          width: 21px;
          height: 21px;
          position: relative;
          top: -1px;
        }
        input[type=checkbox]:checked + .form-checklist-item-box {
          background: url('../images/icons/form-checkmark.svg') center no-repeat;
        }
      }
    }
  }
}
